package nl.grol.yakshop.domain.service;

import nl.grol.yakshop.domain.model.MilkableI;
import nl.grol.yakshop.domain.model.ShaveableI;

import com.google.common.collect.ImmutableList;

/**
 * Responsible for calculating milk and wool production of individuals and herds
 * 
 * @author mgrol
 *
 */
public interface ProductionCalculatorI {
	

	/**
 	 * Milk production for a single creature on a particular day
 	 * 
 	 * @param milkable creature
	 * @param daysSinceStartOfShop
	 * @return milk production in liters
	 */
	double calculateYakMilkProductionForDay( MilkableI milkable, int daysSinceStartOfShop );
	
	/**
 	 *  Milk production for a single creature since start of shop
 	 * 
 	 * @param milkable creature
	 * @param daysSinceStartOfShop
	 * @return milk production in liters
	 */
	double calculateYakMilkProductionSofar( MilkableI milkable, int daysSinceStartOfShop );
	
	/**
 	 *  Milk production for group of creatures since start of shop
 	 * 
 	 * @param milkableHerd group of creatures
	 * @param daysSinceStartOfShop
	 * @return milk production in liters
	 */
	double calculateHerdMilkProductionSofar( ImmutableList<? extends MilkableI> milkableHerd, int daysSinceStartOfShop );
	
	/**
 	 * Wool production for a single creature on a particular day
 	 * 
 	 * @param milkable group of creatures
	 * @param daysSinceStartOfShop
	 * @return
	 */
	boolean mustYakBeShavedOnDay( ShaveableI shaveable, int daysSinceStartOfShop );
	
	/**
 	 *  Wool production for a single creature since start of shop
 	 * 
 	 * @param shaveable creature
	 * @param daysSinceStartOfShop
	 * @return number of shaved skins sofar
	 */
	int calculateSkinsShavenFromYakSofar( ShaveableI shaveable, int daysSinceStartOfShop );
	
	/**
 	 *  Wool production for group of creatures  since start of shop
 	 * 
 	 * @param shaveableHerd creature
	 * @param daysSinceStartOfShop
	 * @return number of shaved skins sofar
	 */
	int calculateHerdSkinProductionSofar( ImmutableList<? extends ShaveableI> shaveableHerd, int daysSinceStartOfShop );

}
